using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class admin_admMaster : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //check login
        bool admLogin = false;
        if (Request.Browser.Cookies && Request.Cookies["AdmLogin"] != null)
        {
            admLogin = Convert.ToBoolean(Request.Cookies["AdmLogin"].Value);
        }
        if (!admLogin) Server.Transfer("default.aspx");
    }

    protected void lnkLogout_Click(object sender, EventArgs e)
    {
        if (Request.Browser.Cookies)
        {
            Response.Cookies["AdmLogin"].Expires = DateTime.Now.AddDays(-1);
            Server.Transfer("default.aspx");
        }
    }
}
